package com.apes.scm.masterdata.enumeration.repository;

import com.apes.framework.jpa.repository.CustomRepository;
import com.apes.scm.masterdata.enumeration.model.EnumerationType;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

/**
 * @author xul
 * @create 2018-02-06 16:47
 */
public interface EnumerationTypeRepository extends CustomRepository<EnumerationType, String> {

    @Query("select T from EnumerationType T where 1 = 1 and (id like %:value%  or description like %:value%) ")
    Page<EnumerationType> find(@Param("value") String value, Pageable pageable);
}
